home *** CD-ROM | disk | FTP | other *** search
- /* _chmod2.c --- p 574 */
- #include <stdio.h>
- #include <dos.h>
- main()
- {
- int attribute;
- char filename[80], *p_fname;
- printf("Enter filename: ");
- p_fname = gets(filename);
- if((attribute = _chmod(p_fname, 0)) == -1)
- {
- printf("Error in _chmod call!\n");
- exit(0);
- }
- if ((attribute & FA_DIREC) == FA_DIREC)
- printf("%s is a subdirectory. \n", filename);
- else
- printf("%s is NOT a subdirectory. \n", filename);
- }